ArcPad Scripting Object Model
ShowFont Example
Send Feedback
ArcPad Scripting Object Model Reference > ArcPad Scripting Samples > ShowFont Example

Glossary Item Box

Description

Allows the user to select a font and displays the font details.

VBScript Code

Copy Code
Sub ShowFont
      Dim pFont, blnOK
      Set pFont = Application.CreateAppObject ("font")
      
      blnOK = CommonDialog.ShowFont (pFont)
      If blnOK Then
            MsgBox "Here are the details of the font you selected:" & vbCrlf & _
                        "Bold: " & pFont.Bold & vbCrlf & _
                        "Charset: " & pFont.Charset & vbCrlf & _
                        "Italic: " & pFont.Italic & vbCrlf & _
                        "Name: " & pFont.Name & vbCrlf & _
                        "Size: " & pFont.Size & vbCrlf & _
                        "Strikethrough: " & pFont.StrikeThrough & vbCrlf & _
                        "Underlined: " & pFont.Underline & vbCrlf & _
                        "Weight: " & pFont.Weight, vbInformation, "Font details"
      Else
            MsgBox "No font selected.  The Cancel button was pushed.", vbInformation, "No font selected"
      End If
End Sub

 

©2012. All Rights Reserved.